home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Toolbox
/
Visual Basic Toolbox (P.I.E.)(1996).ISO
/
dll_gen
/
vbdllcal
/
main.frm
< prev
next >
Wrap
Text File
|
1995-11-02
|
3KB
|
101 lines
VERSION 2.00
Begin Form Form1
BackColor = &H00C0C0C0&
Caption = "Concatonate Strings"
ClientHeight = 2460
ClientLeft = 876
ClientTop = 1524
ClientWidth = 6420
Height = 2880
Left = 828
LinkTopic = "Form1"
ScaleHeight = 2460
ScaleWidth = 6420
Top = 1152
Width = 6516
Begin CommandButton Command1
Caption = "&Make String"
Height = 492
Left = 2340
TabIndex = 6
Top = 1560
Width = 1752
End
Begin TextBox Text3
Height = 288
Left = 1740
TabIndex = 5
Top = 1080
Width = 4572
End
Begin TextBox Text2
Height = 288
Left = 1740
TabIndex = 3
Text = " to work with computers"
Top = 660
Width = 3072
End
Begin TextBox Text1
Height = 288
Left = 1740
TabIndex = 1
Text = "I really like"
Top = 240
Width = 3072
End
Begin Label Label3
BackColor = &H00C0C0C0&
Caption = "Final String"
Height = 252
Left = 180
TabIndex = 4
Top = 1080
Width = 1392
End
Begin Label Label2
BackColor = &H00C0C0C0&
Caption = "String &B"
Height = 252
Left = 180
TabIndex = 2
Top = 660
Width = 1392
End
Begin Label Label1
BackColor = &H00C0C0C0&
Caption = "String &A"
Height = 252
Left = 180
TabIndex = 0
Top = 240
Width = 1392
End
End
Option Explicit
' Take the two strings in the form and make a third
Sub Command1_Click ()
Dim NewString$
Dim StringA$
Dim StringB$
Dim SpaceNeeded%
' Get the strings from the text controls
StringA = Text1
StringB = Text2
' Allocate space for new string
SpaceNeeded = Len(StringA) + Len(StringB) + 1
NewString = Space$(SpaceNeeded)
' Call the DLL function
AddStrings StringA, StringB, NewString, SpaceNeeded
' Show the new string
Text3 = NewString
End Sub